package com.midea.leetcode;

public class AddNum {
    public static void main(String[] args) {
        System.out.println(sumNums(5));
    }
        public static int sumNums(int n) {
            boolean b = n > 0 && ((n  = n + sumNums(n - 1)) > 0);
            return n;

    }
}
